#include "MasterPortal.h"

#include "ExtensionManager.h"
#include "ExtensionSession.h"
#include "XmlRpcMaster.h"
#include "XmlRpcServer.h"
#include "XmlRpcService.h"

MasterProtal::MasterProtal(TaskModel* model, QObject *context)
{
	taskmodel = model;
	initSystem();
}

void MasterProtal::initSystem()
{
	ExtensionSession* es = ExtensionSession::instance();
	ExtensionManager* em = ExtensionManager::instance();

	XmlRpcMaster* xmlRpcMaster = new XmlRpcMaster;

	es->addObject("XmlRpcMaster", xmlRpcMaster);

	mainSystem();
	em->loadExtension();
}

void MasterProtal::mainSystem()
{
	rsgisMaster = new RsGisRpcMaster(taskmodel);
}
